<?php
/**
 * Smarty plugin
 * -------------------------------------------------------------
 * File:     insert.module_hot.php
 * Type:     time
 * Name:     time
 * Author:   王超, <wisoch@hotmail.com>
 * Purpose:  输出页面头
 * -------------------------------------------------------------
 */

function smarty_insert_module_hot($params, $smarty) {
	$size = $params['size']? $params['size']: 10;
	$tpl = $params['tpl']? $params['$tpl']: 'module/module_hot.html';
	
	$mProduct = new Product_model();
	$params['hot'] = 1;
	$hot = $mProduct->page(1, $size, $params);
	$smarty->assign('hot', $hot['data']);
	
	$html = $smarty->fetch($tpl);
	return $html;
}
?>